#include <iostream>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <cppunit/BriefTestProgressListener.h>


int main(int argc, char** argv)
{
	std::cout << "Starting test sequence!" << std::endl;
	CPPUNIT_NS::TestResult result;
	CPPUNIT_NS::TestResultCollector collector;
	result.addListener(&collector);
	
	CPPUNIT_NS::BriefTestProgressListener progress;
	result.addListener(&progress);

	CPPUNIT_NS::TestRunner runner; 
	runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
	runner.run(result);

	CPPUNIT_NS::CompilerOutputter outputter(&collector, std::cerr);
	outputter.write();

	return 0;
//	return collector.wasSuccessful() ? 0 : 1;

}
